﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MarvinsArena.Core;
using MarvinsArena.Robot.Core;
using System.Drawing;

namespace MarvinsArena.Core
{
	public class Robot:IRobot
	{

		public RobotLoader loader { get; set; }
		public RobotHost RobotHost { get; set; }
		
		public string Name { get; set; }
		public double PositionX { get { return this.RobotHost.PositionX; } set { this.RobotHost.PositionX = value; } }
		public double PositionY { get { return this.RobotHost.PositionY; } set { this.RobotHost.PositionY = value; } }
		public double Radius { get { return 12.0f; } }
		public double Rotation { get { return this.RobotHost.Rotation; } set { this.RobotHost.Rotation = value; } }
		public TypeWorldObjects TypeWorldObject { get { return TypeWorldObjects.Robot; } }


		public double RotationGun { get { return this.RobotHost.RotationGun; } set { this.RobotHost.RotationGun = value; } }
		public double RotationRadar { get { return this.RobotHost.RotationRadar; } set { this.RobotHost.RotationRadar = value; } }
		public int SquadNumber { get { return this.RobotHost.SquadNumber; } set { this.SquadNumber = value; } }
		public int Team { get { return this.RobotHost.Team; } set { this.Team = value; } }
		public string FullName { get { return String.Format("{0} {1}.{2}", this.RobotHost.Name, this.RobotHost.Team, this.RobotHost.SquadNumber); } set { this.FullName = value; } }
		public int Hitpoints { get { return this.RobotHost.Hitpoints; } set { this.Hitpoints = value; } }
		public int Missiles { get { return this.RobotHost.Missiles; } set { this.Missiles = value; } }
		public int Heat { get { return this.RobotHost.Heat; } set { this.Heat = value; } }
		public bool IsActive { get { return this.RobotHost.IsActive; } set { this.IsActive = value; } }
		public string DisabledMessage { get { return this.RobotHost.DisabledMessage; } set { this.DisabledMessage = value; } }
		public event EventHandler<MessageExchangeFromRobotEventArgs> HandleRobotEvents { add { } remove { } }


		public Robot(RobotLoader loader)
		{
			this.loader = loader;
			this.RobotHost = loader.RobotHost;
		}


	}
}
